package com.difsonapps.contacttranslator.dto;

public enum TransactionSourceTypeEnum {
	MOBILE_MONEY(0), ORANGE_MONEY(1),GOOGLE_VALLEY(2),PAYPAL(3),CREDIT_CARD(4),CUSTOM(5);

	private int code;

	private TransactionSourceTypeEnum(int code) {
		this.code = code;
	}

	public static TransactionSourceTypeEnum getDefault() {
		return TransactionSourceTypeEnum.MOBILE_MONEY;
	}

	public int getCode() {
		return code;
	}

	public static TransactionSourceTypeEnum get(int code) {
		switch (code) {
		case 0:
			return MOBILE_MONEY;
		case 1:
			return ORANGE_MONEY;
		case 2:
			return GOOGLE_VALLEY;
		case 3:
			return PAYPAL;
		case 4:
			return CREDIT_CARD;
		case 5:
			return CUSTOM;
		}
		return MOBILE_MONEY;
	}
}
